<?php
// Save Real Estate Request submited

if (!defined('EXPONENT')) exit('');
    $config = $db->selectObject('rsrequestmodule_config',"location_data='".serialize($loc)."'");
    if (!$config)
    {
        $config->not_login_message="Not Configured";
        $config->submit_success_message="Not Configured";
    }
    $rs_request=null;
    $rs_request = rsrequest_item::publicrequest_save($_POST, $rs_request);
	$rs_request->location_data = serialize($loc);
    
    // Send email,...
    
    // unset somefields we dont need to 
    
    $db->insertObject($rs_request,"rsrequest_item");
    
    echo $config->submit_success_message;
?>